package cn.aihongbo.kmp.pages.home

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import cn.aihongbo.kmp.data.vm.HomeViewModel
import coil3.compose.AsyncImage

@Composable
fun HomeRedHotBanner(viewModel: HomeViewModel) {
    LazyRow(Modifier.background(Color.Transparent).padding(start = 12.dp)) {
        for (item in viewModel.redHotBanners) item {
            AsyncImage(
                model = item.bannerUrl,
                contentDescription = null,
                modifier = Modifier.padding(horizontal = 4.dp).clip(RoundedCornerShape(13))
            )
        }
    }
}